{% extends 'layout.html' %}
{% block content %}

<div class="container">
    <div class="panel  panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">编辑人员信息</h3>
        </div>

        <div class="panel-body">
            <!-- class="form-inline" ：水平排列-->
            <!--            novalidate 不让浏览器自动校验错误-->
            <form METHOD="post" novalidate>
                <!--            post 请求下要添加-->
                {% csrf_token %}

                {% for field in form %}
                <div class="form-group">
                    <label> {{field.label}}</label>
                    {{field}}
                    <!--            错误提示-->
                    <!--                    可能有很多错误，显示第一个错误-->
                    <span style="color: red">{{field.errors.0}}</span>
                </div>
                {% endfor %}

                <button type="submit" class="btn btn-primary">提交</button>
            </form>
        </div>
    </div>
</div>


{% endblock %}